<div class="structuralLinks" xmlns="http://www.w3.org/1999/html">
  <%if(@designer!= nil) %>
    <h4 style="position:absolute; right:50px;"><%= link_to 'Description', product_path(@product,:designer_id=>@designer.id) %>  &nbsp; <%= link_to 'Photo-gallery', photogallery_product_path(@product,:designer_id=>@designer.id) %> &nbsp;Datasheet</h4>
  <%elsif(@title=="Must-have"||@title=="New")%>
    <h4 style="position:absolute; right:50px;"><%= link_to 'Description', product_path(@product,:title=>@title) %>  &nbsp; <%= link_to 'Photo-gallery', photogallery_product_path(@product,:title=>@title) %> &nbsp;Datasheet</h4>
  <%elsif(@product_type_id!=nil)%>
      <h4 style="position:absolute; right:50px;"><%= link_to 'Description', product_path(@product,:product_type_id=>@product_type_id)%> &nbsp; <%= link_to 'Photo-gallery', photogallery_product_path(@product,:product_type_id=>@product_type_id) %> &nbsp; Datasheet</h4>
  <%else%>
      <h4 style="position:absolute; right:50px;"><%= link_to 'Description', product_path(@product) %>  &nbsp; <%= link_to 'Photo-gallery', photogallery_product_path(@product) %> &nbsp;Datasheet</h4>
  <%end%>
      </div>

<br>

<div>
    <hr style="clear:both;"/>
    <br>
    <div class="ProductHeader">
      <h1> Datasheet of <%= @product.name %>   </h1>



      <% if(@title!=nil) %>
          <h6> Designed by
            <% @designers.each do |designer| %>
                <%= link_to designer.name, designer_path(designer,:product_id=>@product.id, :title=>@title) %>
            <% end  %> <br>
            Exposed in
            <% @events.each do |event| %>
                <%= link_to event.name, event_path(event, :title=>@title) %>
            <% end  %> <br>
            <% if @partner !=nil %>
                In partnership with
                <%= link_to @partner.name, @partner.website %>
            <% end %>
            <br><br>
            <%= link_to 'Find this product', shops_for_this_product_product_path(@product, :title=>@title) %>
          </h6>

      <% elsif(@designer!=nil) %>
          <h6> Designed by
            <% @designers.each do |designer| %>
                <%= link_to designer.name, designer_path(designer,:product_id=>@product.id, :designer_id=>@designer.id) %>
            <% end  %> <br>
            Exposed in
            <% @events.each do |event| %>
                <%= link_to event.name, event_path(event, :designer_id=>@designer.id) %>
            <% end  %> <br>
            <% if @partner !=nil %>
                In partnership with
                <%= link_to @partner.name, @partner.website %>
            <% end %>
            <br><br>
            <%= link_to 'Find this product', shops_for_this_product_product_path(@product, :designer_id=>@designer.id) %>
          </h6>

      <% elsif(@product_type_id!=nil) %>
          <h6> Designed by
            <% @designers.each do |designer| %>
                <%= link_to designer.name, designer_path(designer,:product_id=>@product.id, :product_type_id=>@product_type_id) %>
            <% end  %> <br>
            Exposed in
            <% @events.each do |event| %>
                <%= link_to event.name, event_path(event, :product_type_id=>@product_type_id) %>
            <% end  %> <br>
            <% if @partner !=nil %>
                In partnership with
                <%= link_to @partner.name, @partner.website %>
            <% end %>
            <br><br>
            <%= link_to 'Find this product', shops_for_this_product_product_path(@product, :product_type_id=>@product_type_id) %>
          </h6>

      <% else %>
          <h6> Designed by
            <% @designers.each do |designer| %>
                <%= link_to designer.name, designer_path(designer,:product_id=>@product.id) %>
            <% end  %> <br>
            Exposed in
            <% @events.each do |event| %>
                <%= link_to event.name, event_path(event) %>
            <% end  %> <br>
            <% if @partner !=nil %>
                In partnership with
                <%= link_to @partner.name, @partner.website %>
            <% end %>
            <br><br>
            <%= link_to 'Find this product', shops_for_this_product_product_path(@product) %>
          </h6>
      <% end %>



    </div>

    <div class="mainProductImg">
      <%= image_tag("/products/datasheets/#{@product.tech_image_url}") %>
    </div>
</div>
<br><br>

<div class="box1">
<hr style="clear:both;"/>
  <h3> Technical info</h3>
<%= @product.datasheet%>

</div>

<div class="box2">
<hr style="clear:both;"/>
  <h3> Services</h3>
  <br>
  <%@services.each do |service| %>
      <%= link_to service.name, service_path(service)%>
  <%end%>
</div>




<!-- BACK LINKS-->

<div id="backLinkProduct">
  <div id="imageBack">
    <% if(@title=="All") %>

        <%= link_to "/products" do%>
            <%= image_tag("/back.png") %>
        <% end %>
        </div>
        <div id="textBack">
          Back to <%=@title%> products
        </div>
    <% elsif(@title=="Must-have") %>

        <%= link_to "/products?must=true" do%>
            <%= image_tag("/back.png") %>
        <% end %>
        </div>
        <div id="textBack">
          Back to <%=@title%> products
        </div>
    <% elsif(@title=="New") %>

        <%= link_to "/products?new=true" do%>
            <%= image_tag("/back.png") %>
        <% end %>
        </div>
        <div id="textBack">
          Back to <%=@title%> products
        </div>
    <% elsif(@designer!= nil) %>

        <%= link_to products_designer_path(@designer) do%>
            <%= image_tag("/back.png") %>
        <% end %>
        </div>
        <div id="textBack">
          Back to <%=@designer.name%>'s products
        </div>
    <% elsif(@product_type_id!=nil) %>

        <%= link_to products_path(:product_type_id=>@product_type_id) do%>
            <%= image_tag("/back.png") %>
        <% end %>
        </div>
        <div id="textBack">
          Back to "<%= @product_type.name %>"
        </div>
    <% end %>

    </div>